package com.data.construct.linkedList;

/**
 * 双链表节点实现
 *
 * @author sunhl
 * @Description:
 * @Date: created in 2024/10/22 0022 10:17
 * @Modified By:
 */
public class DoubleNode<E> {
    // 为了方便, 先用protected
    protected E val;

    protected DoubleNode<E> prev;

    protected DoubleNode<E> next;

    public DoubleNode(E val) {
        this.val = val;
    }

    public E getVal() {
        return val;
    }

    public void setVal(E val) {
        this.val = val;
    }

    public DoubleNode<E> getPrev() {
        return prev;
    }

    public void setPrev(DoubleNode<E> prev) {
        this.prev = prev;
    }

    public DoubleNode<E> getNext() {
        return next;
    }

    public void setNext(DoubleNode<E> next) {
        this.next = next;
    }
}
